#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int t;
string s;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    cin >> t;
    while (t--)
    {
        cin >> s;
        int n = s.size();

        int l = 0, r = n-1, times = n;
        bool flag = true;
        while (times) {
            if (s[l] == 'a' + times - 1) {
                l++, times--;
            } else if (s[r] == 'a' + times - 1) {
                r--, times--;
            } else {
                flag = false;
                break;
            }
        }
        if (flag)
        cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}